<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        div{
            width: 400px;
            height: 400px;
            background: red;
            font-size: 30px;
            cursor: pointer;
        }
    </style>
</head>
<body>

    <div>

    </div>

    <script>
        var div=document.querySelector('div');
        div.onclick=function()
        {
            this.style.marginLeft='200px'
            this.style.backgroundColor='blue'
        }
        
        div.onmouseover=function()
        {
            this.style.backgroundColor='yellow'
        }
        div.onmouseout=function()
        {
            this.style.backgroundColor='red'
        }
        div.onmousemove=function(event)
        {
           this.innerHTML='X:'+event.pageX+'Y:'+event.pageY;
        }
    </script>
    
</body>
</html>